package com.easepal802s.project;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.easepal802s.project.ble.BleController;

import static com.easepal802s.project.ble.BleController.CONNECT_SUCCEED;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_7506);
        findViewById(R.id.activity_home_iv_profession).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e("onClick",BleController.getInst().getConnectState()+"");
                if(BleController.getInst().getConnectState()==CONNECT_SUCCEED){
//                    BleController.getInst().sendSingleData(BleConstant.TURNING,true);
                }
                else {
                    BleController.getInst().scanDevice();
                }

            }
        });
    }
}
